package com.atguigu.gulimall.authserver.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.authserver.vo.SocialUser;
import com.atguigu.gulimall.authserver.vo.UserLoginInfoVo;
import com.atguigu.gulimall.authserver.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("gulimall-ums")
public interface MemberFeignService {

    @RequestMapping("/member/member/regsiter")
    //@RequiresPermissions("member:member:list")
    public R register(@RequestBody UserRegisterVo userRegisterVo);

    @RequestMapping("/member/member/loginCheck")
    public R loginCheck(@RequestBody UserLoginInfoVo userLoginInfoVo);

    @PostMapping(value = "/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;
}
